﻿<wpfc:HostControl x:Class="Sobiens.Connectors.WPF.Controls.ContentExplorer"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:wpfc="clr-namespace:Sobiens.Connectors.WPF.Controls"
             xmlns:ExtendedGridControl="clr-namespace:Sobiens.WPF.Controls.ExtendedGridControl;assembly=Sobiens.WPF.Controls"
             xmlns:ExtendedColumn="clr-namespace:Sobiens.WPF.Controls.ExtendedColumn;assembly=Sobiens.WPF.Controls" mc:Ignorable="d" 
             xmlns:my1="clr-namespace:Sobiens.WPF.Controls.UserControls;assembly=Sobiens.WPF.Controls"
             xmlns:jas="clr-namespace:WPF.JoshSmith.ServiceProviders.UI"
             d:DesignHeight="296" d:DesignWidth="372" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="5,0,0,0" VerticalContentAlignment="Stretch" BorderBrush="{x:Null}" Background="{x:Null}">
    <UserControl.Resources>

        <Style x:Key="ItemContStyle" TargetType="ListViewItem">
            <Style.Resources>
                <LinearGradientBrush x:Key="MouseOverBrush" StartPoint="0.5, 0" EndPoint="0.5, 1">
                    <GradientStop Color="#110000ff" Offset="0" />
                    <GradientStop Color="#330000ff" Offset="0.4" />
                    <GradientStop Color="#440000ff" Offset="0.6" />
                    <GradientStop Color="#220000ff" Offset="0.9" />
                    <GradientStop Color="#110000ff" Offset="1" />
                </LinearGradientBrush>
            </Style.Resources>
            <Style.Triggers>
                <Trigger Property="jas:ListViewItemDragState.IsBeingDragged" Value="True">
                    <Setter Property="FontWeight" Value="DemiBold" />
                </Trigger>
                <Trigger Property="jas:ListViewItemDragState.IsUnderDragCursor" Value="True">
                    <Setter Property="Background" Value="{StaticResource MouseOverBrush}" />
                </Trigger>
            </Style.Triggers>
        </Style>
    </UserControl.Resources>
    <DockPanel x:Name="rootDockPanel" ClipToBounds="False" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" ForceCursor="True" LastChildFill="True" Margin="0,0,0,0">
        <Grid>
            <wpfc:SimpleSearchFiltersPanel x:Name="SimpleSearchFiltersPanel1" HorizontalAlignment="Stretch" Height="48" VerticalAlignment="Top" After_PageChange="SimpleSearchFiltersPanel1_After_PageChange" After_ViewChange="SimpleSearchFiltersPanel1_After_ViewChange" After_SearchExecuted="SimpleSearchFiltersPanel1_After_SearchExecuted" />

            <ListView Grid.Row="2" Name="LibraryContentDataListView" Margin="0,50,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
        BorderThickness="0" MouseDoubleClick="LibraryContentDataGridView_MouseDoubleClick"
              Height="{Binding Rows[2].Height, 
              RelativeSource={RelativeSource Mode=FindAncestor, 
                                 AncestorType={x:Type Grid }}}" 
                      ItemContainerStyle="{StaticResource ItemContStyle}"
               ContextMenuOpening="LibraryContentDataGridView_ContextMenuOpening"
               ItemsSource="{Binding SourceTable}" AllowDrop="True" Drop="LibraryContentDataGridView_DragDrop" SelectionMode="Single" VerticalContentAlignment="Stretch" DockPanel.Dock="Top" HorizontalContentAlignment="Stretch" Background="{x:Null}">
                <ListView.View>
                    <GridView  x:Name="GridViewControl">
                        <GridViewColumn Header="{DynamicResource Title}" DisplayMemberBinding="{Binding Path=Title}" Width="123" />
                    </GridView>
                </ListView.View>

            </ListView>
        </Grid>
    </DockPanel>
</wpfc:HostControl>
